home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d12 / cbibcode.arc / BDOSPTR.C < prev    next >
Encoding:
Text File  |  1991-08-05  |  457 b   |  17 lines

  1. /* bdosptr.c --- p 554 */
  2. #include <stdio.h >
  3. #include <stdlib.h>
  4. #include <dos.h>
  5.             /* DOS function to change current directory */
  6. #define DOS_CHDIR 0x3b
  7. main()
  8. {
  9.     char newdir[80];
  10.     printf("Change current directory to: ");
  11.     gets(newdir);
  12.             /* Nothing needs to be specified for AL. Use a ).*/
  13.     bdosptr(DOS_CHDIR, newdir, 0);
  14.         /* Check current directory with the DOS 'dir' command */
  15.     printf("Current directory is: ");
  16.     system("dir/w");
  17. }